package cn.windfly.demo.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

@Api(description = "测试类")
@RestController
@RequestMapping("/api")
public class ApiController {

	@ApiOperation("测试请求")
	@GetMapping("/hello")
	public User hello(@ApiParam("用户名")String name) {
		return new User();
	}
	
	class User{
		@ApiModelProperty("姓名")
		private String name;
		@ApiModelProperty("年龄")
		private int age;
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public int getAge() {
			return age;
		}
		public void setAge(int age) {
			this.age = age;
		}
		
		
	}
}
